# -*- coding:utf-8 -*-

"""

"""

from aw import *
from autotest import *

import time


class Test_012(TestCase):
    def setUp(self):
        print("Test_001 setUp")

    def test(self):
        Common.getProducts()

        # ZC201812192045537991165
        Common.selectProduct("ZC201812192045537991165")
        Common.updateProduct("ZC201812192045537991165", min_tendered_sum=10000)
        Common.updateProduct("ZC201812192045537991165", max_tendered_sum=25000, remain_sum=30000)
        Common.updateProduct("ZC201812192045537991165", product_status=5, raise_end_time="2018-12-31 23:59:59")

        Common.clearInvestInfoOnPno("ZC201812192045537991165")
        Common.cleanCache(1100111023)
        Common.cleanCache(1100099819)
        Common.cleanCache("ZC201812192045537991165")

        Common.updateProduct("ZC201812192045537991165", max_tendered_sum=15000, remain_sum=20000)
        Common.updateProduct("ZC201812192045537991165", max_tendered_sum=30000, remain_sum=20000)
        Common.updateProduct("ZC201812192045537991165", max_tendered_sum=30000, remain_sum=19900)

        Common.getAccountInfo("杨磊")
        Common.setAccountBalance("杨磊", 120000000)

        Common.updateProduct("ZC201812192045537991165", max_tendered_sum=15000)
        Common.updateProduct("ZC201812192045537991165", max_tendered_sum=10000000, remain_sum=1000000000,
                             all_tendered_sum=30000000)
        Common.updateProduct("ZC201812192045537991165", all_tendered_sum=30000000)  # 累计限购

        Common.getAccountInfoByUid(1100098551)

        Common.getAccountInfoByPhone(13302443119)
        Common.getAccountInfoByPhone(18566772480)
        Common.getAccountInfoByPhone(18670229814)
        Common.cleanCache(1100099819)

        Common.selectWhiteList(1100098551)
        Common.selectWhiteList(1100111023)

        Common.insertWhiteList(1100111023)

        Common.changeWhiteList(1100099819, "web_v3_0_home", "web_v3_0_home11")

        Common.getAllTmps()


        # 5是失败,3是确认中
        # 登录账户 13302443119  于光启  身份证 652801197205124475  银行卡 6210986530034901837  13302443119  #account_no于光启
        # 登录账户 13825288850  雷小蕾  身份证 431126198211159342  银行卡 6217 582 0000 1290 7548  13825288850
        # 登录账户 13825288850  熊诗兰 152127197510115847  银行卡 6217 582 0000 1290 7548  13825288850
        # 登录账户 13825288850  苏凝珍 142732197412092583  银行卡 6217 582 0000 1290 7545



        try:
            while True:
                Common.execSql(
                    "UPDATE `finance_fixin_custody`.`t_user_account` SET `status` = 1 WHERE `account_name` = '熊诗兰'")
                import time
                time.sleep(0.001)
        except Exception as e:
            pass

    def tearDown(self):
        print("Test_001 tearDown")
